﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;

public partial class UserControl_GisShow : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        mapPanel.Width = this.Width;
        mapPanel.Height = this.Height; 

        //for (int i = 0; i < 5; i++)
        //{
        //    this.MarkerPoints.Add(new MarkerPoint(new PointF(CenterPoint.X + 0.01F * i, CenterPoint.Y + 0.01F * i), "null", "你说的什么啊"));
        //}

        //for (int i = 0; i < 5; i++)
        //{
        //    this.MarkerPoints.Add(new MarkerPoint(new PointF(CenterPoint.X - 0.01F * i, CenterPoint.Y + 0.01F * i), "null", "你说的什么啊"));
        //}

        //for (int i = 0; i < 5; i++)
        //{
        //    this.MarkerPoints.Add(new MarkerPoint(new PointF(CenterPoint.X - 0.01F * i, CenterPoint.Y - 0.01F * i), "null", "你说的什么啊"));
        //}
    }


    /// <summary>
    /// X 为经度，Y为纬度
    /// </summary>
    PointF centerPoint = new PointF(116.40741300000002F, 39.904214F);
    /// <summary>
    /// Gets or sets the center point.
    /// </summary>
    /// <value>The center point.</value>
    /// <Author>Tecky Lee</Author>
    /// <Date>2011/5/28 20:13</Date>
    public System.Drawing.PointF CenterPoint
    {
        get { return centerPoint; }
        set { centerPoint = value; }
    }

    List<MarkerPoint> markerPoints = new List<MarkerPoint>();

    /// <summary>
    /// Gets or sets the marker points.
    /// </summary>
    /// <value>The marker points.</value>
    /// <Author>Tecky Lee</Author>
    /// <Date>2011/5/28 20:13</Date>
    public List<MarkerPoint> MarkerPoints
    {
        get { return markerPoints; }
        set { markerPoints = value; }
    }

    private int width = 200;
    public int Width
    {
        get { return width; }
        set { width = value; }
    }

    private int height = 200;
    public int Height
    {
        get { return height; }
        set { height = value; }
    }
}

public struct MarkerPoint
{
    public MarkerPoint(PointF point, string tipsContent, string clickInfoContent)
    {
        this.Point = point;
        this.TipsContent = tipsContent;
        this.ClickInfoContent = clickInfoContent.Replace("'", "\"");
    }
    public PointF Point;
    public string TipsContent;
    public string ClickInfoContent;

}